import openpyxl

wk = openpyxl.load_workbook('新建 Microsoft Excel 工作表.xlsx')
# print(wk)
my_sheet = wk['Sheet1']

# # 获取某个单元格内的内容
# value1 = my_sheet.cell(1, 2).value
# print(value1)
h_max = my_sheet.max_row
l_max = my_sheet.max_column
# print("最大行数为：{}".format(h_max))
# print("最大列数为：{}".format(l_max))
values = []
# keys = []
# for j in range(1, l_max + 1):
#     keys.append(my_sheet.cell(1, j).value)
# print(keys)
for i in range(2, h_max+1):
    for j in range(1, l_max+1):
        value = {}
        value[my_sheet.cell(1, j).value] = my_sheet.cell(i, j).value
        values.append(value)
print(values)